# 获取当前登录用户的用户名
current_user=$SUDO_USER


# 启动数据库
if [ "$(id -u)" -eq 0 ]; then
    su -c "/home/"$current_user"/ivsql/bin/pg_ctl -D /home/"$current_user"/ivsql/data start" -s /bin/bash "$current_user"
else
    /home/"$current_user"/ivsql/bin/pg_ctl -D /home/"$current_user"/ivsql/data start
fi
